<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Voodoo Shader Framework: K:/VoodooShader/Framework/Exception.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>K:/VoodooShader/Framework/Exception.cpp</h1><a href="_exception_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="preprocessor">#include &quot;<a class="code" href="_exception_8hpp.html">Exception.hpp</a>&quot;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &quot;<a class="code" href="_core_8hpp.html">Core.hpp</a>&quot;</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="keyword">namespace </span>VoodooShader
<a name="l00006"></a>00006 {
<a name="l00007"></a><a class="code" href="class_voodoo_shader_1_1_exception.html#a62d58782ee003be19d69d98f3d88ca04">00007</a>         <a class="code" href="class_voodoo_shader_1_1_exception.html#a62d58782ee003be19d69d98f3d88ca04">Exception::Exception</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * message, <a class="code" href="class_voodoo_shader_1_1_core.html" title="Core engine class for the Voodoo Shader Framework.">Core</a> * core, <span class="keywordtype">char</span> * file, <span class="keywordtype">char</span> * function, <span class="keywordtype">int</span> line)
<a name="l00008"></a>00008                 : std::exception(message),
<a name="l00009"></a>00009                   mMessage(message), mCore(core), mFile(file), mFunction(function), mLine(line)
<a name="l00010"></a>00010         {
<a name="l00011"></a>00011                 <span class="keywordflow">if</span> ( core )
<a name="l00012"></a>00012                 {
<a name="l00013"></a>00013                         <a class="code" href="class_voodoo_shader_1_1_logger.html" title="Logfile management class.">Logger</a> * Log = core-&gt;<a class="code" href="class_voodoo_shader_1_1_core.html#a3dae50629a1c77bd5ac311829ba48c6b">GetLog</a>();
<a name="l00014"></a>00014                         Log-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a>-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#a719f8f5b3f61bf9262da0b2f27cece7e" title="Begins logging a message (passes an initial formatting string).">Record</a>(<span class="stringliteral">&quot;Voodoo Exception in %s at %s (%d): %s&quot;</span>)
<a name="l00015"></a>00015                                 .<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(file).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(function).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(line).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(message).<a class="code" href="class_voodoo_shader_1_1_formatter.html#ae71867d0eb64b74d04030213928cadb5" title="Finalizes a formatted string and prints it to the log.">Done</a>();
<a name="l00016"></a>00016                         Log-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a22bc194ad823275bcc1d327e700d62e9" title="Immediately writes all pending data to disk.">Dump</a>();
<a name="l00017"></a>00017                 }
<a name="l00018"></a>00018         }
<a name="l00019"></a>00019 
<a name="l00020"></a><a class="code" href="class_voodoo_shader_1_1_exception.html#a18054495a13f500e92b92c3046ee37f2">00020</a>         <a class="code" href="class_voodoo_shader_1_1_exception.html#a62d58782ee003be19d69d98f3d88ca04">Exception::Exception</a>(std::string message, <a class="code" href="class_voodoo_shader_1_1_core.html" title="Core engine class for the Voodoo Shader Framework.">Core</a> * core, <span class="keywordtype">char</span> * file, <span class="keywordtype">char</span> * function, <span class="keywordtype">int</span> line)
<a name="l00021"></a>00021                 : std::exception(message.c_str()),
<a name="l00022"></a>00022                   mMessage(message), mCore(core), mFile(file), mFunction(function), mLine(line)
<a name="l00023"></a>00023         {
<a name="l00024"></a>00024                 <span class="keywordflow">if</span> ( core )
<a name="l00025"></a>00025                 {
<a name="l00026"></a>00026                         <a class="code" href="class_voodoo_shader_1_1_logger.html" title="Logfile management class.">Logger</a> * Log = core-&gt;<a class="code" href="class_voodoo_shader_1_1_core.html#a3dae50629a1c77bd5ac311829ba48c6b">GetLog</a>();
<a name="l00027"></a>00027                         Log-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a>-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#a719f8f5b3f61bf9262da0b2f27cece7e" title="Begins logging a message (passes an initial formatting string).">Record</a>(<span class="stringliteral">&quot;Voodoo Exception in %s at %s (%d): %s&quot;</span>)
<a name="l00028"></a>00028                                 .<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(file).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(function).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(line).<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(message).<a class="code" href="class_voodoo_shader_1_1_formatter.html#ae71867d0eb64b74d04030213928cadb5" title="Finalizes a formatted string and prints it to the log.">Done</a>();
<a name="l00029"></a>00029                         Log-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a22bc194ad823275bcc1d327e700d62e9" title="Immediately writes all pending data to disk.">Dump</a>();
<a name="l00030"></a>00030                 }
<a name="l00031"></a>00031         }
<a name="l00032"></a>00032 }
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Oct 14 19:58:31 2010 for Voodoo Shader Framework by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
